﻿using Dapper_Core.Basic;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace Dapper_Core.Table
{
    public class Sys_User : BaseModel
    {
        /// <summary>
        /// Guid主键，主键必须加[Key]特性，若想对名为Id的列赋值必须加[Required]特性
        /// </summary>
        [Key]
        [Required]
        public string Id { get; set; }
        /// <summary>
        /// 用户工号
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// AD中cn的属性值
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 用户密码
        /// </summary>
        public string Password { get; set; }
        /// <summary>
        /// 邮箱地址
        /// </summary>
        public string Email { get; set; }
        /// <summary>
        /// 家庭住址
        /// </summary>
        public string Address { get; set; }
        /// <summary>
        /// 联系方式
        /// </summary>
        public string Mobile { get; set; }
        /// <summary>
        /// 最近登录时间
        /// </summary>
        public DateTime? Last_Login_Time { get; set; }
        /// <summary>
        /// 最近登录所用IP
        /// </summary>
        public string Last_Login_IP { get; set; }
        /// <summary>
        /// 是否有效（0无效、1有效）
        /// </summary>
        public int IsActive { get; set; }
        /// <summary>
        /// 有效期截止时间
        /// </summary>
        public DateTime? AvailableTime { get; set; }
        /// <summary>
        /// 用户类型（0公共账号、1正式账号、2外协账号）
        /// </summary>
        public string UserType { get; set; }
    }
}
